package com.hjc.project.util;

import com.google.common.base.Charsets;
import com.google.common.io.Files;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

public class EsData2File {
    public static void main(String[] args) {

    }

    public static void writeFile() throws IOException {
        //追加内容
        File sinkFile = new File("D:/test1");
        if (sinkFile.length() > 1000000) {
            return;
        }
        Files.asCharSink(sinkFile, Charsets.UTF_8).writeLines(new ArrayList<>());
    }
}
